{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "outputs": [],
   "source": [
    "from sklearn import datasets\n",
    "\n",
    "iris = datasets.load_iris()\n",
    "\n",
    "X = iris['data'][:, (2, 3)]\n",
    "y = iris['target']\n",
    "# 取其中两种分类\n",
    "select = (y == 0) | (y == 1)\n",
    "X = X[select]\n",
    "y = y[select]"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% 1.初始数据获取部分\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "outputs": [
    {
     "data": {
      "text/plain": "<Figure size 432x288 with 1 Axes>",
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAD8CAYAAAB5Pm/hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAgAElEQVR4nO3de3xU9b3v/9cnE0IIgQASQhJyAUSUq4EICCJVRASUi4KAocfj7nmwi7XtOd3dPfa4256tv+7Hbnd/pz1t7bbs3nblflMExQsKWBDlIuEmQrgTSAKCQCAJSSaf88fMYBJmwqwwyXdW8n0+HuuR5Dtr1rxnxE9WvmutzxJVxbIsy2q5YkwHsCzLspqWLfSWZVktnC30lmVZLZwt9JZlWS2cLfSWZVktnC30lmVZLdxNC72IZIjIBhE5ICL7ReS7QdYREfm1iBwWkT0iMqTWY0+LSIF/eTrSb8CyLMtqmNzsPHoRSQVSVfVTEekA7ASmqupntdaZCHwbmAgMB/6vqg4XkS7ADiAXUP9zh6rql03ybizLsqwb3HSPXlWLVPVT//elwAEgvd5qU4C/qs/HQCf/L4jxwHuqesFf3N8DHonoO7Asy7IaFOtkZRHJBnKAT+o9lA6cqvVzoX8s1Hiwbc8F5gK0b99+6J133ukkWlQ7ePAgV65cITs7m9tuu810HEcKCgq4fPkymZmZJCcnm47jyJEjR7h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CviBSKyDdMZ2oGo4Cv49vLy/cvE02HamKpwAYR2YNvh+Y9VW01pxy2IinAZhHZja+n15uq+rbhTEAUnV5pWZZlNY2o2aO3LMuymoYt9JZlWS2cLfSWZVktnC30lmVZLZwt9JZlWS2cLfSWZVktnC30lmVZLdz/A5P4lZnR3WbdAAAAAElFTkSuQmCC\n"
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import matplotlib.pyplot as plt,numpy as np\n",
    "from sklearn.svm import SVC\n",
    "\n",
    "\n",
    "svm_clf = SVC(kernel='linear', C=float('inf'))\n",
    "svm_clf.fit(X, y)\n",
    "\n",
    "w = svm_clf.coef_[0]\n",
    "b = svm_clf.intercept_[0]\n",
    "\n",
    "x0 = np.linspace(0, 5.5, 200)\n",
    "decision_boundary = - w[0] / w[1] * x0 - b / w[1]\n",
    "margin = 1 / w[1]\n",
    "gutter_up = decision_boundary + margin\n",
    "gutter_down = decision_boundary - margin\n",
    "\n",
    "plt.plot(X[:, 0][y == 1], X[:, 1][y == 1], 'bs', marker=\"o\")\n",
    "plt.plot(X[:, 0][y == 0], X[:, 1][y == 0], 'rs', marker=\"^\")\n",
    "plt.plot(x0, decision_boundary, 'k-', linewidth=2)\n",
    "plt.plot(x0, gutter_up, 'k--', linewidth=2)\n",
    "plt.plot(x0, gutter_down, 'k--', linewidth=2)\n",
    "\n",
    "svs = svm_clf.support_vectors_\n",
    "plt.scatter(svs[:, 0], svs[:, 1], s=180, facecolors='#FFAAAA')\n",
    "plt.axis([0, 5.5, 0, 2])\n",
    "plt.show()"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% 2.初始数据分类\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "outputs": [
    {
     "data": {
      "text/plain": "[<matplotlib.lines.Line2D at 0x1639eff3808>]"
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "text/plain": "<Figure size 432x288 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5R2/7EkkvSfpcRJzf9HjayvYbJL0hIr5h+zWS9kh6d0Q81vDQWsW2JZ0RES/ZPkXSvZJ+LSIeaHhorWT7Rkkzkv5TRLyj6fG0ke2nJM1ExNi/WJbMjD4ivibp+abH0XYRcTgivpG//xdJj0ta3+yo2icyL+W7p+RbGrOiIbO9QdLPSPps02NBb8kEeiyd7WlJF0j6u2ZH0k757Yi9ko5I2h0RXKfePiXpNyUdH/TBVS4kfdn2HttbxtkxgX6Vsv2Dkj4v6b9FxD83PZ42iohjEfFWSRskbbLNLcEutt8h6UhE7Gl6LCvAxRFxoaSrJX0wv908FgT6VSi/5/x5STsi4k+aHk/bRcR3JX1V0lUND6WNLpb0zvz+8y5Jl9m+o9khtVNEHMpfj0j6gqRN4+qbQL/K5IuM/1/S4xHxv5oeT1vZnrL92vz96ZKukPT3zY6qfSLi4xGxISKmJV0j6Z6IuL7hYbWO7TPyhx9k+wxJV0oa2xOCyQR62zsl3S/pR2wftP3+psfUUhdL+gVlM6+9+fb2pgfVQm+Q9BXbD0t6UNk9eh4dxHL9kKR7be+T9HVJfxERfzWuzpN5vBIA0FsyM3oAQG8EegBIHIEeABJHoAeAxBHoASBxBHoASByBHgAS9x8C7Kg43CqP7gAAAABJRU5ErkJggg==\n"
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import pandas as pd\n",
    "\n",
    "# 转化成DataFrame\n",
    "y = pd.DataFrame(y)\n",
    "\n",
    "data = np.concatenate((y, X), axis=1)\n",
    "data = pd.DataFrame(data, columns=[\"y\", \"x1\", \"x2\"])\n",
    "\n",
    "# 设定一个离群点\n",
    "hardMargin = [[0,2.5, 1.25]]\n",
    "hardMargin = pd.DataFrame(hardMargin, columns=[\"y\", \"x1\", \"x2\"])\n",
    "data = data.append(hardMargin)\n",
    "\n",
    "plt.plot(data[data[\"y\"]==0][\"x1\"], data[data[\"y\"]==0][\"x2\"], 'rs', marker=\"^\")\n",
    "plt.plot(data[data[\"y\"]==1][\"x1\"], data[data[\"y\"]==1][\"x2\"], 'bs', marker=\"o\")\n",
    "\n"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% 3.引入噪声点\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[ 3.66972477 -1.10091743]\n"
     ]
    },
    {
     "data": {
      "text/plain": "<matplotlib.collections.PathCollection at 0x1639f095308>"
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "text/plain": "<Figure size 432x288 with 1 Axes>",
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAD8CAYAAAB5Pm/hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAgAElEQVR4nO3de3xU5dXo8d9KQoAQkAhBISFc5BpCFKF4DrTWeqv6qtRqrYp9tfX9UFFrWz/Hntq+vZxaq7W19bWFWqrUerxQxUuptd7tqYr6FoGQkEBIkEsMEIEQCIGEZNb5YyYySWYmk713Mnsm6/v5zCeZvWeveZIPrHny7OdZj6gqxhhjUldaohtgjDGmd1miN8aYFGeJ3hhjUpwlemOMSXGW6I0xJsVZojfGmBTXbaIXkbEi8qaIVIjIRhH5ZoTXiIg8ICJVIrJBRE4PO3ediGwJPa7z+gcwxhgTm3Q3j15ERgOjVXWtiAwFPgC+oKrlYa+5CPgGcBFwBvBfqnqGiJwIrAHmABq6draq1vfKT2OMMaaLbnv0qrpLVdeGvj8EVAB5nV62AHhUg94Dhoc+ID4PvKqq+0PJ/VXgAk9/AmOMMTFl9OTFIjIemAW83+lUHrAz7HlN6Fi045FiLwIWAQwZMmT2tGnTetI0YyLatWsXtbW1nHTSSeTn5zuO09jYyObNm8nKymL69OmO46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yIZwAnA/jivNcYY04viSfT/AiaLyAQRySR4c3VVp9esAq4LfX8F8IYG57atAq4KzcqZAEwG/tubphtjjIlHt0M3oTH3W4CXgXRguapuFJGfAGtUdRXwMPB/RaSKYE/+qtC1G0XkKaAcaAVuVtW2XvpZvOabYSQfsN/Fcfa7OM5+F8f5+nchtqjEGGNSm62MNcaYFGeJ3hhjUpwl+k5EZLmI1IlIWaLbkmgiMlZE3hSRChHZKCLfTHSbEkVEBonIf4tISeh38X8S3aZEEpF0EVknIi8kui2JJiLbRKRURNaLyJpEtycSG6PvRETOBBqBR1W1KNHtSSQRGQ2MVtW1IjIU+AD4gqqWJ7hpfS600nuIqjaKyADgbeCbqvpeN5emJBG5DZgDDFPVixPdnkQSkW3AHFVN9IKpqKxH34mq/pPgzKF+T1V3qera0PeHgAqirGxOdRrUGHo6IPTol70kEckH/g14KNFtMfGxRG/iEqpIOgt4P7EtSZzQcMV6oA54VVX76+/ifuA7QKC7F/YTCrwiIh+ESrn4jiV60y0RyQaeAb6lqgcT3Z5EUdU2VT2N4ArvuSLS74b2RORioE5VP0h0W3xkvqqeTrDC782h4V9fsURvYgqNRz8DPK6qzya6PX6gqgeAfxAsvd3fzAcuDY1LrwDOFpHHEtukxFLV2tDXOuA5fFih1xK9iSp0A/JhoEJVf5Xo9iSSiOSKyPDQ94OBc4FNiW1V31PVO1Q1X1XHE1wB/4aqXpvgZiWMiAwJTVRARIYA5wO+m7Fnib4TEXkSeBeYKiI1InJDotuUQPOBrxDsta0PPS5KdKMSZDTwpohsIFj/6VVV7fdTCw0nAW+LSAnBOl5/U9WXEtymLmx6pTHGpDjr0RtjTIqzRG+MMSnOEr0xxqQ4S/TGGJPiLNEbY0yKs0RvjDEpzhK9McakuP8Pl0y4gSM0ARQAAAAASUVORK5CYII=\n"
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "from sklearn.svm import SVC\n",
    "\n",
    "svm_clf = SVC(kernel='linear', C=float('inf'))\n",
    "svm_clf.fit(data[[\"x1\", \"x2\"]], data[\"y\"])\n",
    "\n",
    "# 对应SVM中的W和b\n",
    "w = svm_clf.coef_[0]\n",
    "b = svm_clf.intercept_[0]\n",
    "print (w)\n",
    "\n",
    "x0 = np.linspace(0, 5.5, 200)\n",
    "decision_boundary = - w[0]/w[1] * x0 - b/w[1]\n",
    "margin = 1/w[1]\n",
    "gutter_up = decision_boundary + margin\n",
    "gutter_down = decision_boundary - margin\n",
    "\n",
    "plt.xlim(0.5, 5.5)\n",
    "plt.ylim(0, 2)\n",
    "\n",
    "plt.plot(data[data[\"y\"]==0][\"x1\"], data[data[\"y\"]==0][\"x2\"], 'rs', marker=\"^\")\n",
    "plt.plot(data[data[\"y\"]==1][\"x1\"], data[data[\"y\"]==1][\"x2\"], 'bs', marker=\"o\")\n",
    "plt.plot(x0, decision_boundary, 'k-', linewidth=2)\n",
    "plt.plot(x0, gutter_up, 'k--', linewidth=2)\n",
    "plt.plot(x0, gutter_down, 'k--', linewidth=2)\n",
    "\n",
    "svs = svm_clf.support_vectors_\n",
    "plt.scatter(svs[:,0], svs[:,1], s=180, facecolors='#FFAAAA')\n",
    "\n"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% 4.直接对有噪声点的数据集分类\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[1.33879297 0.2094827 ]\n"
     ]
    },
    {
     "data": {
      "text/plain": "[0, 5.5, 0, 2]"
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "text/plain": "<Figure size 432x288 with 1 Axes>",
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAD8CAYAAAB5Pm/hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh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iIwSkWGx34uBM4B/hhtV5qjqN1X1GFWdiPfv+FlVvTzksDJOREpiEwwQkRLgTCASM+oik+hVtRXoKLXwNvBbVV0TblSZJSIPAy8DHxCRrSJyVdgxZUElcAVeL29l7HF22EFl2NHAcyLyJl6HZpmq9psph/3IaOBFEVmFV9Prj6r655BjAiI0vdIYY0xmRKZHb4wxJjMs0RtjTI6zRG+MMTnOEr0xxuQ4S/TGGJPjLNEbY0yOs0RvjDE57v8DaRBddfHzAvEAAAAASUVORK5CYII=\n"
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "from sklearn.svm import SVC\n",
    "\n",
    "svm_clf = SVC(kernel='linear', C=1)\n",
    "svm_clf.fit(data[[\"x1\", \"x2\"]], data[\"y\"])\n",
    "\n",
    "w = svm_clf.coef_[0]\n",
    "b = svm_clf.intercept_[0]\n",
    "print (w)\n",
    "x0 = np.linspace(0, 5.5, 200)\n",
    "decision_boundary = - w[0] / w[1] * x0 - b / w[1]\n",
    "margin = 1 / w[1]\n",
    "gutter_up = decision_boundary + margin\n",
    "gutter_down = decision_boundary - margin\n",
    "\n",
    "plt.plot(data[data[\"y\"]==0][\"x1\"], data[data[\"y\"]==0][\"x2\"], 'rs', marker=\"^\")\n",
    "plt.plot(data[data[\"y\"]==1][\"x1\"], data[data[\"y\"]==1][\"x2\"], 'bs', marker=\"o\")\n",
    "plt.plot(x0, decision_boundary, 'k-', linewidth=2)\n",
    "plt.plot(x0, gutter_up, 'k--', linewidth=2)\n",
    "plt.plot(x0, gutter_down, 'k--', linewidth=2)\n",
    "svs = svm_clf.support_vectors_\n",
    "plt.scatter(svs[:,0],svs[:,1],s=180,facecolors='#FFAAAA')\n",
    "plt.axis([0,5.5,0,2])\n"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% 5.引入松弛因子\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "outputs": [
    {
     "data": {
      "text/plain": "<Figure size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light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "from sklearn.datasets import make_moons\n",
    "\n",
    "X, y = make_moons(n_samples=100, noise=0.15, random_state=42)\n",
    "\n",
    "\n",
    "plt.plot(X[:, 0][y==0], X[:, 1][y==0] ,'bs' ,marker=\"o\")\n",
    "plt.plot(X[:, 0][y==1], X[:, 1][y==1],'rs', marker=\"^\")\n",
    "plt.axis([-1.5, 2.5, -1, 1.5])\n",
    "plt.grid(True, which='both')\n",
    "\n",
    "plt.show()"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% 6.线性不可分的点集\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "outputs": [
    {
     "data": {
      "text/plain": "<matplotlib.contour.QuadContourSet at 0x1639f1c3d88>"
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "text/plain": "<Figure size 432x288 with 1 Axes>",
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAD8CAYAAAB3u9PLAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAgAElEQVR4nO3de5DU5Z3v8fe3Z2AGUGGEgQGGKIygw65B0VWJZykTVxMgJbuL2ZBaN7gVY3liErNbW3VMbeJ6zFqardpU1HDOxpALUomYk+REDKCu4m724HjNircxiIAyOxdmQFEE5vqcP7p76Gm6Z/ryu/Z8XlVT9PT8+vd7+HX3833ujznnEBERSYSdABERiQYFBBERARQQREQkRQFBREQABQQREUlRQBAREcCjgGBmPzKzg2b2ap6/X2FmR8zspdTPbV5cV0REvFPt0Xl+AnwPeGCUY/7DOfdpj64nIiIe86SG4Jz7LXDYi3OJiEg4vKohFGKZme0C2oG/c869ln2Amd0I3AhQW1t70bzGjwSYvNIMuSESFv2uGKXTW0qnt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gHpDJ1zrsM597vU4w9Ijoycm3VY6PezwHQWLTIBoQgOeNzMXkwtdRFFuZbrKPvNKtIs51wHJD88wMw8x9Wa2Qtm9oyZBRU0Crk/w8e45NDlI8D0QFKXIw0p+d7HNammg1+Y2bwcfw9bFD6PhVpmZrvMbLuZ/UGYCUk1U14IPJv1p0jdz1HSCUXez0A3yPFgGQyAy51z7WY2E/hXM3sjVfLwTJDLdZRjtHQWcZqPpO7nAmCHmb3inHvLmxTmVcj9CeQejqGQNDwCPOic6zWzm0jWaj7he8qKE4V7WYjfAWc5546a2Urg18DCMBJiZqcBvwS+5px7P/vPOV4Syv0cI51F389AA4IrfxkMnHPtqX8Pmtn/JVmt9zQgeJDOQJbrGC2dZtZlZrOdcx2p6uzBPOdI38+9ZvZvJEsafgeEQu5P+pg2M6sGphJ8c8OY6XTOHcr49QfAtwNIV7FisXxMZobmnNtmZv/LzGY45wJdUM7MJpDMZH/qnPtVjkMicT/HSmcp9zNWTUZmNsXMTk8/Bq4muSdD1ERhuY4twLrU43XAKTUbM6szs5rU4xnA5QSzLHkh9ycz/dcCO1yqpyxAY6Yzq+34GpJtuVGzBfh8anTMZcCRdHNilJhZQ7qfyMwuIZk/HRr9VZ6nwYAfAq3Oue/kOSz0+1lIOku6n0H3jo/Sa/5nJCNvL9AFPJZ6fg6wLfV4AcmRHruA10g24UQune7kSITdJEvbYaRzOvAk8Gbq3zNTz18MbEg9/hjwSup+vgJ8IcD0nXJ/gDuAa1KPa4H/A+wBngMWhPS5HCudd6U+i7uAp4DzQkjjg0AH0J/6bH4BuAm4KfV3I7lJ1Vup9znvKL6Q0/nljHv5DPCxENL430g2/7wMvJT6WRm1+1lgOou+n1q6QkREgJg1GYmIiH8UEEREBFBAEBGRFAUEEREBFBBERCRFAUFERAAFBBERSfn/tkdmKxzUeBoAAAAASUVORK5CYII=\n"
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "from sklearn.datasets import make_moons\n",
    "import matplotlib.pyplot as plt,numpy as np\n",
    "from sklearn.svm import SVC\n",
    "\n",
    "X, y = make_moons(n_samples=100, noise=0.15, random_state=42)\n",
    "\n",
    "rbf = SVC(kernel='rbf', gamma=1)\n",
    "rbf.fit(X,y)\n",
    "\n",
    "plt.plot(X[:, 0][y==0], X[:, 1][y==0] ,'bs' ,marker=\"o\")\n",
    "plt.plot(X[:, 0][y==1], X[:, 1][y==1],'rs', marker=\"^\")\n",
    "plt.axis([-1.5, 2.5, -1, 1.5])\n",
    "plt.grid(True, which='both')\n",
    "\n",
    "x0s = np.linspace(-1.5,2.5,100)\n",
    "x1s = np.linspace(-1,1.5,100)\n",
    "x0,x1 = np.meshgrid(x0s, x1s)\n",
    "\n",
    "# 将平面按横轴分成100份,按纵轴分成100份,交叉形成100x100个点,X就是存放着100个点的矩阵\n",
    "X = np.c_[x0.ravel(),x1.ravel()] # X:{ndarray:(10000, 2)}\n",
    "\n",
    "# 对这10_000个点都进行预测,再切割成100x100的矩阵\n",
    "y_pred = rbf.predict(X).reshape(x0.shape)\n",
    "\n",
    "# 前三个参数分别是:\n",
    "    # x0: 横轴\n",
    "    # x1: 纵轴\n",
    "    # y_pred: 该点是1 or 0\n",
    "plt.contourf(x0, x1, y_pred, cmap=plt.cm.brg, alpha=0.2)\n"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% 7.引入核函数,这里是\"径向基\"(RBF)\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "outputs": [],
   "source": [],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}